package com.zqx.kafkaproject.kafkademo.controller;

import com.zqx.kafkaproject.kafkademo.components.KafkaReceiver;
import com.zqx.kafkaproject.kafkademo.components.KafkaSender;
import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.apache.kafka.clients.consumer.ConsumerRecords;
import org.apache.kafka.clients.consumer.KafkaConsumer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Arrays;
import java.util.Properties;

@RestController
@RequestMapping("/kafka")
@Slf4j
public class KafkaController {

    @Autowired
    private KafkaSender kafkaSender;

    @RequestMapping("/getKafka")
    public void getKafka()
    {
        kafkaSender.send();
    }
}
